<?php

namespace App\Http\Middleware;

use Closure;

class LoginMiddleware
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        //request变量 记录所有的请求参数
        if(!$request->cookie('uid')){
            
            //echo'啊勒！原来每个页面都有我啊##原因是你没有登陆哦 ';
            echo '<div style="width:550px;background:yellowgreen;color:#fff">啊勒！原来每个页面都有我啊##原因是你没有登陆哦 思密达(●\'◡\'●)</div>';
        }
        return $next($request);
    }
}
